home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / dirut / new17.zip / NEW.DOC < prev    next >
Text File  |  1989-02-18  |  8KB  |  173 lines

  1.                                 NEW.DOC
  2.  
  3.                              Scott R. Houck
  4.  
  5.                                 2/18/89
  6.  
  7.  
  8.      NEW (version 1.7) is a utility that locates "new" files, that is,
  9. files created as of a certain number of days ago.  It can also find "old"
  10. files if the number of days is a negative number.  It can search the
  11. entire disk (or disks) if desired and can accept wildcards.
  12.  
  13.      The syntax is:  NEW [filespec [filespec...]] [options]
  14.  
  15.      Options and filespecs can be in any order.  Filespecs must be
  16. separated by at least one space.  Valid options are:
  17.  
  18.      /h     Show help screen
  19.      /?     Same as /h
  20.      /n     Show files SINCE the number of days specified by n
  21.      /-n    Show files BEFORE the number of days specified by n
  22.      /p     Pause when screen display is full
  23.      /s     Search specified directory and its subdirectories
  24.      /e     Search entire disk
  25.      /d     Include directories in listing
  26.      /do    Include directories ONLY in listing
  27.      /j     Junk option -- include files with corrupted dates
  28.      /i     Ignore the environment variable NEW if it is defined
  29.  
  30.      If filespec is omitted, *.* is assumed.  Also, a "day" in this 
  31. program starts at 6:00 am and ends at 5:59 am the following day.  Here
  32. are some examples:
  33.  
  34.      C>NEW                   List files in the current directory created
  35.                                or modified as of 6 am
  36.  
  37.      C>NEW *.C               List files as of 6 am with the extension .C
  38.  
  39.      C>NEW /7                List files as of one week ago
  40.  
  41.      C>NEW /E                Search entire disk for files as of 6 am
  42.  
  43.      C>NEW C: D: /E          Search all of drives C: and D:
  44.  
  45.      C>NEW \MSC\*.C /7 /S    Search for .C files as of one week ago
  46.                                starting from the \MSC directory and
  47.                                searching all subdirectories of \MSC
  48.  
  49.      C>NEW /7/S \MSC\*.C     Same as previous example above (options and
  50.                                filespec can be in any order)
  51.  
  52.      C>NEW D:/E/365/P        Search all of drive D: for files created up
  53.                                to a year ago and pause when the screen is
  54.                                full
  55.  
  56.      C>NEW /-365             Search for files older than one year
  57.  
  58.      C>NEW /D                Search for today's files, including any
  59.                                directories that were created
  60.  
  61.      C>NEW /DO /7 /E         Display any new directories created in the
  62.                                last 7 days over the entire disk
  63.  
  64.      C>NEW /J                Display new files, including any "junk" files
  65.                                that is, files that have corrupted time
  66.                                stamps
  67.  
  68.      C>NEW C: D: /5000/E/D >ALLFILES.TXT
  69.  
  70.                              List every blessed file and directory on 
  71.                                drives C: and D: since negative infinity
  72.                                (1/1/80), sorted by date, time, and filename,
  73.                                and put them in a file called ALLFILES.TXT
  74.  
  75.      And now for a ridiculous example...
  76.  
  77.      C>NEW C:\MSC\PROG\*.C D:\DBASE\*.DBF E: /30/D/I/J/P/S
  78.  
  79.                               Display files up to a month old that match
  80.                                 the three filespecs listed and their
  81.                                 subdirectories, ignore the environment
  82.                                 variable NEW if it is defined, include
  83.                                 directories and "junk" files, and pause
  84.                                 when the screen is full
  85.  
  86.  
  87.      NEW Environment Variable
  88.      ------------------------
  89.  
  90.      If you find that you would like certain options or filespecs as
  91. defaults, you may set up an environment variable called NEW that includes
  92. the options or filespecs.  For example, if you always want NEW to pause,
  93. put the following command in your AUTOEXEC.BAT file:
  94.  
  95.      SET NEW=/P
  96.  
  97. If you normally want to search all of drives C: and D:, you could use:
  98.  
  99.      SET NEW=C: D:/E
  100.  
  101.      If you've set up the NEW environment variable, but want to override
  102. it temporarily, use the /I option on the command line.  For example, if
  103. you have issued SET NEW=C: D:/E but just want to use NEW on the current
  104. directory, type in NEW/I.  Any other options may be added as well.  For
  105. example, NEW/I/P/7.
  106.  
  107.      You may not specify the options /H, /?, or /I in the NEW environment
  108. variable.  (Wouldn't make sense, now, would it?)
  109.  
  110.      NEW first processes the command line options/filespecs.  If /I is
  111. not issued on the command line and the NEW environment variable is defined,
  112. the environment variable is then processed.
  113.  
  114.  
  115.      NOTES
  116.      -----
  117.  
  118.      1.  The file display is sorted by descending date and time.  If
  119.          two or more files have the same date and time, they are then
  120.          sorted by ascending filename.
  121.  
  122.      2.  If /E or /S is chosen, the directories are displayed as they
  123.          are traversed.
  124.  
  125.      3.  If the full path name of the file is very long, the first
  126.          directory is shown, followed by an ellipsis (...), followed
  127.          by the ending portion of the path name.  I did this because I
  128.          am using NEW on a network drive sometimes, and we tend to get
  129.          carried away with subdirectories!  The /S option comes in handy
  130.          here.  For example, if I want to see only my data area on the
  131.          network, I'll type in NEW \DATA\USERS\SCOTT /S.  Doing a /E on
  132.          our network drive can take 2-3 minutes.  However, the /E option
  133.          is interesting on a network as it shows the current day's
  134.          activities for multiple users (assuming you have supervisory
  135.          rights).
  136.  
  137.      4.  The "junk" option (/J) was added to include files with corrupted
  138.          dates.  Such files defeat the purpose of NEW in that they appear
  139.          to be new files when they really aren't.  However, if you really
  140.          want to see them, use /J.  In fact, if you are trying to locate
  141.          such files, use /J in conjunction with /E to search the entire
  142.          disk.
  143.  
  144.      5.  Normally, I'm not interested in when directories were created,
  145.          but if you really want to include them, use /D.  If you want
  146.          to see ONLY directories (no regular files), use /DO.  Note that
  147.          the /D and /DO options are mutually exclusive.
  148.  
  149.      6.  The /P option has been enhanced to take into account the number
  150.          of text lines being used.  That is, if you are using 43-line mode
  151.          with an EGA or 40- or 50-line mode with a VGA, NEW will pause
  152.          after the appropriate number of lines have been displayed.
  153.  
  154.      7.  Since I am allowing multiple filespecs, it is necessary to show
  155.          the complete path for filenames, even if /E is not being used.
  156.          For example, if you type in NEW C: D:, the current directories
  157.          on C: and D: will be checked.  You need to know just where those
  158.          files really are.  Consequently, if you are just using NEW on
  159.          your current directory, the full path will also appear.  This
  160.          may seem a bit annoying.  To compensate, I am displaying the
  161.          drive and directory path in lower case and the filename in upper
  162.          case.  If you don't like this, well, you got the source code,
  163.          right?  :-)
  164.  
  165.      8.  This program is dedicated to the public domain.  If you would
  166.          like to contact me about bugs, enhancements, or contributions
  167.          that could inspire me to create ever more ingenious utilities,
  168.          I can be reached at the following address:
  169.  
  170.               Scott R. Houck
  171.               200 N. Pickett St. #314
  172.               Alexandria, VA  22304
  173.